<!DOCTYPE html>
<html>
<head>
    <title>{$name} {$seo_title} {$site_name}</title>
    <meta name="keywords" content="{$seo_keywords}" />
    <meta name="description" content="{$seo_description}">
    <tc_include file="Public:head" />
    <link href="/public/css/sl_style.css?v={$SOURCE_VERSION}" rel="stylesheet"/>
    <style>
        .list-group {
            margin-left: 76px;
            margin-top: -20px;
        }
        .question_back_nav {
            height: 40px;
            width: 830px;
            line-height: 48px;
            border-bottom: 1px solid #c5c5c5;
        }
        .question_back_nav li {
            height: 100%;
            line-height:48px;
            width: 25%;
            font-size: 16px;
            cursor: pointer;
        }
        .question_back_content .answer_item {
            margin: 0;
        }

        /*个人的中心布局样式调整*/
        .container {
            width: 1190px;
        }
        .row {
            margin-left: 0px;
            width: 1190px;

        }
        .span3 {
            margin-left: 0;
            width: 280px;
        }
        .span9 {
            width: 830px;
            margin-left: 80px;
        }
        *{

        }

        /*
        .container .title{
            font-size: 16px;
            color: #000232;
            line-height: 48px;
            padding-left: 60px;
            border-bottom: 1px solid #676884;
            margin-bottom: 18px;
        }

       */
        /*个人的中心布局样式调整结束*/
    </style>
</head>
<body>
<tc_include file="Public:nav" />
<div class="container tc-main"  style="margin-top: 90px;>
        <div class="row">
<div class="span3">
    <tc_include file="Public:usernav"/>
</div>
<div class="alone_center span9">

    <ul class="question_back_nav clearfix" id="question_back_nav">
        <li>我的提问(<span>{$count_list[0]}</span>)</li>
        <li>我的回答(<span>{$count_list[1]}</span>)</li>
        <li>查看的问题(<span>{$count_list[2]}</span>)</li>
        <li>我的新消息(<span>{$count_list[3]}</span>)</li>
    </ul>

    <div id="question_back_content">

        <!--我的提问-->
        <div class="question_back_content list_content" style="display:none;">
            <ul>
                <volist name="lists" id="vo">
                    <a href="{:U('Question/Question/question_info', ['id' => $vo['id']])}">
                        <li class="answer_item">
                            <h3 class="ellipsis2">{$vo.post_title}</h3>
                            <p>
                                <span>{$vo.post_date}</span>
                                <span class="sub1">浏览({$vo.post_hits})</span>
                                <span class="sub2">回答({$vo.answer_count})</span>
                                <span class="sub3"></span>
                            </p>
                        </li>
                    </a>
                </volist>
            </ul>
            <if condition="empty($lists)">
                <div style="width: 350px;height: 266px;margin: 40px auto 0;"><img src="/public/images/img/replace.png" alt="" style="width: 100%;height: auto;"></div>
            </if>
        </div>

        <!--我的回答-->
        <div class="question_back_content list_content" style="display: none;">
            <ul>
                <volist name="lists" id="vo">
                    <a href="{:U('Question/Question/question_info', ['id' => $vo['id']])}">
                        <li class="answer_item">
                            <h3 class="ellipsis2">{$vo.post_title}</h3>
                            <p>
                                <span>{$vo.post_date}</span>
                                <span class="sub1">浏览({$vo.post_hits})</span>
                                <span class="sub2">回答({$vo.answer_count})</span>
                                <span class="sub3"></span>
                            </p>
                        </li>
                    </a>
                </volist>
            </ul>
            <if condition="empty($lists)">
                <div style="width: 350px;height: 266px;margin: 40px auto 0;"><img src="/public/images/img/replace.png" alt="" style="width: 100%;height: auto;"></div>
            </if>
        </div>

        <!--查看的问题-->
        <div class="question_back_content list_content" style="display: none;">
            <ul>
                <volist name="lists" id="vo">
                    <a href="{:U('Question/Question/question_info', ['id' => $vo['id']])}">
                        <li class="answer_item">
                            <h3 class="ellipsis2">{$vo.post_title}</h3>
                            <p>
                                <span>{$vo.post_date}</span>
                            </p>
                        </li>
                    </a>
                </volist>
            </ul>
            <if condition="empty($lists)">
                <div style="width: 350px;height: 266px;margin: 40px auto 0;"><img src="/public/images/img/replace.png" alt="" style="width: 100%;height: auto;"></div>
            </if>
        </div>

        <!--我的新消息-->
        <div class="question_back_content list_content" style="display: none;">
            <ul>
                <volist name="lists" id="vo">
                    <a href="{$vo.url}&msg_id={$vo.id}">
                        <li class="news_item">
                            <h3 class="ellipsis1">{$vo.content}</h3>
                            <p class="text ellipsis1">{$vo.post_title}</p>
                            <p><span>{$vo.time}</span></p>
                        </li>
                    </a>
                </volist>
            </ul>
            <if condition="empty($lists)">
                <div style="width: 350px;height: 266px;margin: 40px auto 0;"><img src="/public/images/img/replace.png" alt="" style="width: 100%;height: auto;"></div>
            </if>
        </div>
    </div>

    <div style="width:110px;height: 30px;border-radius: 15px;border: 1px solid #C8161D; color: #C8161D;font-size: 15px;text-align: center;
                line-height: 30px;margin-left: 350px; " class="js-infinite-scroll-loading text-center fontmsyhbd">更多</div>
    <div id="nextpage"></div>
</div>

</div>
</div>
<tc_include file="Public:footer" />
<tc_include file="Public:scripts" />
<script src="__TMPL__Public/assets/js/masonry.pkgd.min.js"></script>
<script src="__TMPL__Public/assets/js/jquery.infiniteScroll.js"></script>

<script type="text/javascript">
    $(function () {

        var index = "{$list_index}";

        // 显示内容
        $('.list_content:eq(' + index + ')').css('display', 'block');

        // 切换tab
        $("#question_back_nav li").on("click", function(){
            var index = $(this).index();
            window.location.href = "{:U('Question/Question/center_question')}" + '&list_index=' + index;
        });

        // tab显示背景
        $('#question_back_nav li:eq(' + index + ')').addClass('active');


        // 加载更多
        $('#nextpage').infiniteScroll({
            loading:'.js-infinite-scroll-loading',
            total_pages:{$total_page},
            success:function(content){
                var $items = $(content).find('.list_content:eq(' + index + ') a');
                if ($items.length > 0) {
                    $('.list_content:eq(' + index + ') ul').append($items);
                }
            }
        });
    })
</script>
<script>

    $(function () {
        setTimeout(anim,500);
        function anim(){
            $(".animate_center_question").find(".menu_main").animate({
                marginLeft:'-50px'
            },200);
            $(".animate_center_question").find(".menu_list").animate({
                height:"36px",
                paddingTop:'12px',
                marginLeft:'10px'
            },200);
            $(".animate_center_question").find(".tab_question").addClass("active");
        }
    })

</script>

</body>
</html>